﻿using System.Collections.Generic;
using ISSMoviePlex.DAL.Models;
using ISSMoviePlex.DAL.Repositories;
namespace ISSMoviePlex.BLL
{
   public class CommentBLL
    {
       private readonly CommentRepository _commentRepository;
        public CommentBLL()
        {
            _commentRepository = CommentRepository.Instance;
            _commentRepository.Initialize();
        }
        public void AddComments(Comment c)
        {
            _commentRepository.Add(c);
            _commentRepository.Save();
        }
        public IEnumerable<Comment> ShowCommentsByMovieId(int movieid)
        {
            return _commentRepository.FindCommentsByMovieId(movieid);
        }
        public IEnumerable<Comment> ShowCommentsByMemberId(int memberid)
        {
            return _commentRepository.FindCommentsByMemberId(memberid);
        }

    }
}
